<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Video extends Model
{
    use HasFactory;
    use SoftDeletes;
    protected  $fillable=['title','content','thumb','url','q','begin_time','end_time','expert'];//黑名单guarded
    public function lecture(){
        return $this->belongsToMany(Expert::class,'lectures','video_id','expert_id');
    }
}
